<?php

namespace app\common\model;
/**
 * [TemplateEncyclopedia 寺院百科表]
 * @author [C。]
 * @return html
 */
class TemplateEncyclopedia extends Base
{
    protected $name = 'template_encyclopedia';
    /**
     * 获取分类列表信息
     */
    public function getlist($map,$from = 0, $size = 5,$field = '*')
    {
        $order = ['id' => 'desc'];
        $result = $this->field($field)->where($map)->limit($from, $size)->order($order)->select();
        return $result;
    }

    /**
     * 根据条件来获取列表的数据的总数
     * @param array $param
     */
    public function getCount($map = []) {
        return $this->where($map)->count();
    }
}